# Model "(2)"Total FDI" in the appendix 
#
# Specify the model, setting effects separately for each dependent network
# network effects
# density (in- and out-degree)
multiPtaEff <- setEffect(multiPtaEff, density, name="posPtas", fix=TRUE)
multiPtaEff <- setEffect(multiPtaEff, density, name="negPtas", fix=TRUE)
multiPtaEff <- includeEffects(multiPtaEff, inPopSqrt, name="posPtas")
multiPtaEff <- includeEffects(multiPtaEff, inPopSqrt, name="negPtas")
# triadic closure
multiPtaEff <- setEffect(multiPtaEff, transTriads, name="posPtas", include=FALSE)
multiPtaEff <- setEffect(multiPtaEff, transTriads, name="negPtas", include=FALSE)
# balance
multiPtaEff <- includeEffects(multiPtaEff, balance, name="posPtas", include=TRUE)
multiPtaEff <- includeEffects(multiPtaEff, balance, name="negPtas", include=TRUE)
#
# covariate effects
# constant dyadic covariates
multiPtaEff <- includeEffects(multiPtaEff, X, interaction1="Distance", name="posPtas")
multiPtaEff <- includeEffects(multiPtaEff, X, interaction1="Distance", name="negPtas")

# time-varying dyadic covariates
multiPtaEff <- includeEffects(multiPtaEff, X, interaction1="Trade", name="posPtas")
multiPtaEff <- includeEffects(multiPtaEff, X, interaction1="Trade", name="negPtas")
multiPtaEff <- includeEffects(multiPtaEff, X, interaction1="GoodsPta", name="posPtas")
multiPtaEff <- includeEffects(multiPtaEff, X, interaction1="GoodsPta", name="negPtas")
# regime type
multiPtaEff <- includeEffects(multiPtaEff, egoXaltX, interaction1="Democracy", name="posPtas")
multiPtaEff <- includeEffects(multiPtaEff, altX, interaction1="Democracy", name="posPtas")
multiPtaEff <- includeEffects(multiPtaEff, egoXaltX, interaction1="Democracy", name="negPtas")
multiPtaEff <- includeEffects(multiPtaEff, altX, interaction1="Democracy", name="negPtas")
#
# relationship with US or China: distance-weighted trade with either party.
multiPtaEff <- includeEffects(multiPtaEff, altX, interaction1="lnUsTrade", name="negPtas")
multiPtaEff <- includeEffects(multiPtaEff, altX, interaction1="lnUsTrade", name="posPtas")
multiPtaEff <- includeEffects(multiPtaEff, altX, interaction1="lnChnTrade", name="posPtas")
multiPtaEff <- includeEffects(multiPtaEff, altX, interaction1="lnChnTrade", name="negPtas")

# relationship with US: dummy for whether a country is a US ally
multiPtaEff <- includeEffects(multiPtaEff, altX, interaction1="usAlliance", name="negPtas")
multiPtaEff <- includeEffects(multiPtaEff, altX, interaction1="usAlliance", name="posPtas")
# #
# income variables
multiPtaEff <- includeEffects(multiPtaEff, altX, interaction1="CapIncome", name="posPtas")
multiPtaEff <- includeEffects(multiPtaEff, simX, interaction1="CapIncome", name="posPtas")
multiPtaEff <- includeEffects(multiPtaEff, altX, interaction1="Income", name="posPtas")
multiPtaEff <- includeEffects(multiPtaEff, simX, interaction1="Income", name="posPtas")
multiPtaEff <- includeEffects(multiPtaEff, altX, interaction1="CapIncome", name="negPtas")
multiPtaEff <- includeEffects(multiPtaEff, simX, interaction1="CapIncome", name="negPtas")
multiPtaEff <- includeEffects(multiPtaEff, altX, interaction1="Income", name="negPtas")
multiPtaEff <- includeEffects(multiPtaEff, simX, interaction1="Income", name="negPtas")
#
# trade in services as share of GDP
multiPtaEff <- includeEffects(multiPtaEff, altX, interaction1="servicesTrade", name="posPtas")
multiPtaEff <- includeEffects(multiPtaEff, altX, interaction1="servicesTrade", name="negPtas")
#
# fdi stock 
multiPtaEff <- includeEffects(multiPtaEff, altX, interaction1="fdi", name="posPtas")
multiPtaEff <- includeEffects(multiPtaEff, altX, interaction1="fdi", name="negPtas")
#
# prior liberalization via GATS commitments
multiPtaEff <- includeEffects(multiPtaEff, altX, interaction1="gatsCommitments", name="negPtas")
multiPtaEff <- includeEffects(multiPtaEff, altX, interaction1="gatsCommitments", name="posPtas")
#